<style>
    #baseGoods-edit {
        padding: 20px 25px 25px 0;
    }
</style>
<div class="layui-fluid" id="baseGoods-edit">
    <form class="layui-form" action="" lay-filter="baseGoods-edit-form">

        <div class="layui-form-item febs-hide">
            <label class="layui-form-label febs-form-item-require">：</label>
            <div class="layui-input-block">
                <input type="text" name="goodsId" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item  febs-hide">
            <label class="layui-form-label febs-form-item-require">所属公司：</label>
            <div class="layui-input-block">
                <input type="text" name="tenantId" autocomplete="off" class="layui-input"
                       maxlength="32" >
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-col-xs12">
                <label class="layui-form-label febs-form-item-require">奖品名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="goodsName" autocomplete="off" class="layui-input"
                           maxlength="150" placeholder="请输入奖品名称" lay-verify="required">
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <div class="layui-col-sm12">
                    <label class="layui-form-label febs-form-item-require">奖品单价：</label>
                    <div class="layui-input-block">
                        <input type="text" name="goodsPrice" autocomplete="off" class="layui-input" placeholder="请输入奖品单价"
                               lay-verify="required|amount"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/\.{2,}/g,'.').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-sm12">
                    <label class="layui-form-label febs-form-item-require">奖品单位：</label>
                    <div class="layui-input-block">
                        <select name="goodsUnit" id="goodsUnit"></select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-sm12">
                    <label class="layui-form-label febs-form-item-require">兑换积分：</label>
                    <div class="layui-input-block">
                        <input type="text" name="exchangeScore" autocomplete="off" class="layui-input"
                               lay-verify="required|number"   placeholder="请输兑换积分"
                               onkeyup="value=value.replace(/[^\d{1,}\d{1,}|\d{1,}]/g,'').replace(/\./g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-sm12">
                    <label class="layui-form-label febs-form-item-require">状态：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <label class="layui-form-label">奖品图片：</label>
                <div class="layui-input-block">
                    <div id="fileUpload" style="height: 180px ;width: 100%">
                    </div>
                </div>
                <input type="text" name="fileName"  class="layui-input febs-hide">
                <input type="text" name="filePath"  class="layui-input febs-hide">
                <input type="text" name="smallPath" class="layui-input febs-hide">
            </div>
        </div>
        <div class="layui-form-item febs-hide">
            <button class="layui-btn" lay-submit="" lay-filter="baseGoods-edit-form-submit" id="submit">1</button>
        </div>
    </form>
</div>
<script data-th-inline="javascript">
    var baseGoodsData = [[${baseGoods}]];
</script>
<script th:src="@{/febs/js/base/baseGoods/baseGoodsEdit.js(v=1)}"></script>